3.204 \(\int \sec (e+f x) (a+a \sec (e+f x))^3 (c+d \sec (e+f x)) \, dx\)

Optimal. Leaf size=125 \[ \frac {a^3 (4 c+3 d) \tan ^3(e+f x)}{12 f}+\frac {a^3 (4 c+3 d) \tan (e+f x)}{f}+\frac {5 a^3 (4 c+3 d) \tanh ^{-1}(\sin (e+f x))}{8 f}+\frac {3 a^3 (4 c+3 d) \tan (e+f x) \sec (e+f x)}{8 f}+\frac {d \tan (e+f x) (a \sec (e+f x)+a)^3}{4 f} \]

[Out]

5/8*a^3*(4*c+3*d)*arctanh(sin(f*x+e))/f+a^3*(4*c+3*d)*tan(f*x+e)/f+3/8*a^3*(4*c+3*d)*sec(f*x+e)*tan(f*x+e)/f+1
/4*d*(a+a*sec(f*x+e))^3*tan(f*x+e)/f+1/12*a^3*(4*c+3*d)*tan(f*x+e)^3/f

________________________________________________________________________________________

Rubi [A]  time = 0.15, antiderivative size = 125, normalized size of antiderivative = 1.00, number of steps used = 10, number of rules used = 6, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.207, Rules used = {4001, 3791, 3770, 3767, 8, 3768} \[ \frac {a^3 (4 c+3 d) \tan ^3(e+f x)}{12 f}+\frac {a^3 (4 c+3 d) \tan (e+f x)}{f}+\frac {5 a^3 (4 c+3 d) \tanh ^{-1}(\sin (e+f x))}{8 f}+\frac {3 a^3 (4 c+3 d) \tan (e+f x) \sec (e+f x)}{8 f}+\frac {d \tan (e+f x) (a \sec (e+f x)+a)^3}{4 f} \]

Antiderivative was successfully verified.

[In]

Int[Sec[e + f*x]*(a + a*Sec[e + f*x])^3*(c + d*Sec[e + f*x]),x]

[Out]

(5*a^3*(4*c + 3*d)*ArcTanh[Sin[e + f*x]])/(8*f) + (a^3*(4*c + 3*d)*Tan[e + f*x])/f + (3*a^3*(4*c + 3*d)*Sec[e
+ f*x]*Tan[e + f*x])/(8*f) + (d*(a + a*Sec[e + f*x])^3*Tan[e + f*x])/(4*f) + (a^3*(4*c + 3*d)*Tan[e + f*x]^3)/
(12*f)

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 3767

Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> -Dist[d^(-1), Subst[Int[ExpandIntegrand[(1 + x^2)^(n/2 - 1), x]
, x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]

Rule 3768

Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> -Simp[(b*Cos[c + d*x]*(b*Csc[c + d*x])^(n - 1))/(d*(n -
 1)), x] + Dist[(b^2*(n - 2))/(n - 1), Int[(b*Csc[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1
] && IntegerQ[2*n]

Rule 3770

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rule 3791

Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_), x_Symbol] :> Int[Expand
Trig[(a + b*csc[e + f*x])^m*(d*csc[e + f*x])^n, x], x] /; FreeQ[{a, b, d, e, f, m, n}, x] && EqQ[a^2 - b^2, 0]
 && IGtQ[m, 0] && RationalQ[n]

Rule 4001

Int[csc[(e_.) + (f_.)*(x_)]*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_)*(csc[(e_.) + (f_.)*(x_)]*(B_.) + (A_))
, x_Symbol] :> -Simp[(B*Cot[e + f*x]*(a + b*Csc[e + f*x])^m)/(f*(m + 1)), x] + Dist[(a*B*m + A*b*(m + 1))/(b*(
m + 1)), Int[Csc[e + f*x]*(a + b*Csc[e + f*x])^m, x], x] /; FreeQ[{a, b, A, B, e, f, m}, x] && NeQ[A*b - a*B,
0] && EqQ[a^2 - b^2, 0] && NeQ[a*B*m + A*b*(m + 1), 0] &&  !LtQ[m, -2^(-1)]

Rubi steps

\begin {align*} \int \sec (e+f x) (a+a \sec (e+f x))^3 (c+d \sec (e+f x)) \, dx &=\frac {d (a+a \sec (e+f x))^3 \tan (e+f x)}{4 f}+\frac {1}{4} (4 c+3 d) \int \sec (e+f x) (a+a \sec (e+f x))^3 \, dx\\ &=\frac {d (a+a \sec (e+f x))^3 \tan (e+f x)}{4 f}+\frac {1}{4} (4 c+3 d) \int \left (a^3 \sec (e+f x)+3 a^3 \sec ^2(e+f x)+3 a^3 \sec ^3(e+f x)+a^3 \sec ^4(e+f x)\right ) \, dx\\ &=\frac {d (a+a \sec (e+f x))^3 \tan (e+f x)}{4 f}+\frac {1}{4} \left (a^3 (4 c+3 d)\right ) \int \sec (e+f x) \, dx+\frac {1}{4} \left (a^3 (4 c+3 d)\right ) \int \sec ^4(e+f x) \, dx+\frac {1}{4} \left (3 a^3 (4 c+3 d)\right ) \int \sec ^2(e+f x) \, dx+\frac {1}{4} \left (3 a^3 (4 c+3 d)\right ) \int \sec ^3(e+f x) \, dx\\ &=\frac {a^3 (4 c+3 d) \tanh ^{-1}(\sin (e+f x))}{4 f}+\frac {3 a^3 (4 c+3 d) \sec (e+f x) \tan (e+f x)}{8 f}+\frac {d (a+a \sec (e+f x))^3 \tan (e+f x)}{4 f}+\frac {1}{8} \left (3 a^3 (4 c+3 d)\right ) \int \sec (e+f x) \, dx-\frac {\left (a^3 (4 c+3 d)\right ) \operatorname {Subst}\left (\int \left (1+x^2\right ) \, dx,x,-\tan (e+f x)\right )}{4 f}-\frac {\left (3 a^3 (4 c+3 d)\right ) \operatorname {Subst}(\int 1 \, dx,x,-\tan (e+f x))}{4 f}\\ &=\frac {5 a^3 (4 c+3 d) \tanh ^{-1}(\sin (e+f x))}{8 f}+\frac {a^3 (4 c+3 d) \tan (e+f x)}{f}+\frac {3 a^3 (4 c+3 d) \sec (e+f x) \tan (e+f x)}{8 f}+\frac {d (a+a \sec (e+f x))^3 \tan (e+f x)}{4 f}+\frac {a^3 (4 c+3 d) \tan ^3(e+f x)}{12 f}\\ \end {align*}

________________________________________________________________________________________

Mathematica [B]  time = 1.37, size = 273, normalized size = 2.18 \[ -\frac {a^3 (\cos (e+f x)+1)^3 \sec ^6\left (\frac {1}{2} (e+f x)\right ) \sec ^4(e+f x) \left (120 (4 c+3 d) \cos ^4(e+f x) \left (\log \left (\cos \left (\frac {1}{2} (e+f x)\right )-\sin \left (\frac {1}{2} (e+f x)\right )\right )-\log \left (\sin \left (\frac {1}{2} (e+f x)\right )+\cos \left (\frac {1}{2} (e+f x)\right )\right )\right )-\sec (e) (-24 (11 c+9 d) \sin (e)+(36 c+69 d) \sin (f x)+36 c \sin (2 e+f x)+280 c \sin (e+2 f x)-72 c \sin (3 e+2 f x)+36 c \sin (2 e+3 f x)+36 c \sin (4 e+3 f x)+88 c \sin (3 e+4 f x)+69 d \sin (2 e+f x)+264 d \sin (e+2 f x)-24 d \sin (3 e+2 f x)+45 d \sin (2 e+3 f x)+45 d \sin (4 e+3 f x)+72 d \sin (3 e+4 f x))\right )}{1536 f} \]

Antiderivative was successfully verified.

[In]

Integrate[Sec[e + f*x]*(a + a*Sec[e + f*x])^3*(c + d*Sec[e + f*x]),x]

[Out]

-1/1536*(a^3*(1 + Cos[e + f*x])^3*Sec[(e + f*x)/2]^6*Sec[e + f*x]^4*(120*(4*c + 3*d)*Cos[e + f*x]^4*(Log[Cos[(
e + f*x)/2] - Sin[(e + f*x)/2]] - Log[Cos[(e + f*x)/2] + Sin[(e + f*x)/2]]) - Sec[e]*(-24*(11*c + 9*d)*Sin[e]
+ (36*c + 69*d)*Sin[f*x] + 36*c*Sin[2*e + f*x] + 69*d*Sin[2*e + f*x] + 280*c*Sin[e + 2*f*x] + 264*d*Sin[e + 2*
f*x] - 72*c*Sin[3*e + 2*f*x] - 24*d*Sin[3*e + 2*f*x] + 36*c*Sin[2*e + 3*f*x] + 45*d*Sin[2*e + 3*f*x] + 36*c*Si
n[4*e + 3*f*x] + 45*d*Sin[4*e + 3*f*x] + 88*c*Sin[3*e + 4*f*x] + 72*d*Sin[3*e + 4*f*x])))/f

________________________________________________________________________________________

fricas [A]  time = 0.43, size = 161, normalized size = 1.29 \[ \frac {15 \, {\left (4 \, a^{3} c + 3 \, a^{3} d\right )} \cos \left (f x + e\right )^{4} \log \left (\sin \left (f x + e\right ) + 1\right ) - 15 \, {\left (4 \, a^{3} c + 3 \, a^{3} d\right )} \cos \left (f x + e\right )^{4} \log \left (-\sin \left (f x + e\right ) + 1\right ) + 2 \, {\left (6 \, a^{3} d + 8 \, {\left (11 \, a^{3} c + 9 \, a^{3} d\right )} \cos \left (f x + e\right )^{3} + 9 \, {\left (4 \, a^{3} c + 5 \, a^{3} d\right )} \cos \left (f x + e\right )^{2} + 8 \, {\left (a^{3} c + 3 \, a^{3} d\right )} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )}{48 \, f \cos \left (f x + e\right )^{4}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(f*x+e)*(a+a*sec(f*x+e))^3*(c+d*sec(f*x+e)),x, algorithm="fricas")

[Out]

1/48*(15*(4*a^3*c + 3*a^3*d)*cos(f*x + e)^4*log(sin(f*x + e) + 1) - 15*(4*a^3*c + 3*a^3*d)*cos(f*x + e)^4*log(
-sin(f*x + e) + 1) + 2*(6*a^3*d + 8*(11*a^3*c + 9*a^3*d)*cos(f*x + e)^3 + 9*(4*a^3*c + 5*a^3*d)*cos(f*x + e)^2
 + 8*(a^3*c + 3*a^3*d)*cos(f*x + e))*sin(f*x + e))/(f*cos(f*x + e)^4)

________________________________________________________________________________________

giac [F(-2)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: NotImplementedError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(f*x+e)*(a+a*sec(f*x+e))^3*(c+d*sec(f*x+e)),x, algorithm="giac")

[Out]

Exception raised: NotImplementedError >> Unable to parse Giac output: Unable to check sign: (4*pi/x/2)>(-4*pi/
x/2)Unable to check sign: (4*pi/x/2)>(-4*pi/x/2)2/f*((-20*a^3*c-15*a^3*d)/16*ln(abs(tan((f*x+exp(1))/2)-1))-(-
20*a^3*c-15*a^3*d)/16*ln(abs(tan((f*x+exp(1))/2)+1))+(-60*tan((f*x+exp(1))/2)^7*a^3*c-45*tan((f*x+exp(1))/2)^7
*a^3*d+220*tan((f*x+exp(1))/2)^5*a^3*c+165*tan((f*x+exp(1))/2)^5*a^3*d-292*tan((f*x+exp(1))/2)^3*a^3*c-219*tan
((f*x+exp(1))/2)^3*a^3*d+132*tan((f*x+exp(1))/2)*a^3*c+147*tan((f*x+exp(1))/2)*a^3*d)*1/24/(tan((f*x+exp(1))/2
)^2-1)^4)

________________________________________________________________________________________

maple [A]  time = 1.39, size = 188, normalized size = 1.50 \[ \frac {5 a^{3} c \ln \left (\sec \left (f x +e \right )+\tan \left (f x +e \right )\right )}{2 f}+\frac {3 a^{3} d \tan \left (f x +e \right )}{f}+\frac {11 a^{3} c \tan \left (f x +e \right )}{3 f}+\frac {15 a^{3} d \sec \left (f x +e \right ) \tan \left (f x +e \right )}{8 f}+\frac {15 a^{3} d \ln \left (\sec \left (f x +e \right )+\tan \left (f x +e \right )\right )}{8 f}+\frac {3 a^{3} c \sec \left (f x +e \right ) \tan \left (f x +e \right )}{2 f}+\frac {a^{3} d \tan \left (f x +e \right ) \left (\sec ^{2}\left (f x +e \right )\right )}{f}+\frac {a^{3} c \tan \left (f x +e \right ) \left (\sec ^{2}\left (f x +e \right )\right )}{3 f}+\frac {a^{3} d \tan \left (f x +e \right ) \left (\sec ^{3}\left (f x +e \right )\right )}{4 f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(f*x+e)*(a+a*sec(f*x+e))^3*(c+d*sec(f*x+e)),x)

[Out]

5/2/f*a^3*c*ln(sec(f*x+e)+tan(f*x+e))+3/f*a^3*d*tan(f*x+e)+11/3*a^3*c*tan(f*x+e)/f+15/8/f*a^3*d*sec(f*x+e)*tan
(f*x+e)+15/8/f*a^3*d*ln(sec(f*x+e)+tan(f*x+e))+3/2*a^3*c*sec(f*x+e)*tan(f*x+e)/f+1/f*a^3*d*tan(f*x+e)*sec(f*x+
e)^2+1/3/f*a^3*c*tan(f*x+e)*sec(f*x+e)^2+1/4/f*a^3*d*tan(f*x+e)*sec(f*x+e)^3

________________________________________________________________________________________

maxima [B]  time = 0.42, size = 262, normalized size = 2.10 \[ \frac {16 \, {\left (\tan \left (f x + e\right )^{3} + 3 \, \tan \left (f x + e\right )\right )} a^{3} c + 48 \, {\left (\tan \left (f x + e\right )^{3} + 3 \, \tan \left (f x + e\right )\right )} a^{3} d - 3 \, a^{3} d {\left (\frac {2 \, {\left (3 \, \sin \left (f x + e\right )^{3} - 5 \, \sin \left (f x + e\right )\right )}}{\sin \left (f x + e\right )^{4} - 2 \, \sin \left (f x + e\right )^{2} + 1} - 3 \, \log \left (\sin \left (f x + e\right ) + 1\right ) + 3 \, \log \left (\sin \left (f x + e\right ) - 1\right )\right )} - 36 \, a^{3} c {\left (\frac {2 \, \sin \left (f x + e\right )}{\sin \left (f x + e\right )^{2} - 1} - \log \left (\sin \left (f x + e\right ) + 1\right ) + \log \left (\sin \left (f x + e\right ) - 1\right )\right )} - 36 \, a^{3} d {\left (\frac {2 \, \sin \left (f x + e\right )}{\sin \left (f x + e\right )^{2} - 1} - \log \left (\sin \left (f x + e\right ) + 1\right ) + \log \left (\sin \left (f x + e\right ) - 1\right )\right )} + 48 \, a^{3} c \log \left (\sec \left (f x + e\right ) + \tan \left (f x + e\right )\right ) + 144 \, a^{3} c \tan \left (f x + e\right ) + 48 \, a^{3} d \tan \left (f x + e\right )}{48 \, f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(f*x+e)*(a+a*sec(f*x+e))^3*(c+d*sec(f*x+e)),x, algorithm="maxima")

[Out]

1/48*(16*(tan(f*x + e)^3 + 3*tan(f*x + e))*a^3*c + 48*(tan(f*x + e)^3 + 3*tan(f*x + e))*a^3*d - 3*a^3*d*(2*(3*
sin(f*x + e)^3 - 5*sin(f*x + e))/(sin(f*x + e)^4 - 2*sin(f*x + e)^2 + 1) - 3*log(sin(f*x + e) + 1) + 3*log(sin
(f*x + e) - 1)) - 36*a^3*c*(2*sin(f*x + e)/(sin(f*x + e)^2 - 1) - log(sin(f*x + e) + 1) + log(sin(f*x + e) - 1
)) - 36*a^3*d*(2*sin(f*x + e)/(sin(f*x + e)^2 - 1) - log(sin(f*x + e) + 1) + log(sin(f*x + e) - 1)) + 48*a^3*c
*log(sec(f*x + e) + tan(f*x + e)) + 144*a^3*c*tan(f*x + e) + 48*a^3*d*tan(f*x + e))/f

________________________________________________________________________________________

mupad [B]  time = 5.31, size = 203, normalized size = 1.62 \[ \frac {\left (-5\,a^3\,c-\frac {15\,a^3\,d}{4}\right )\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^7+\left (\frac {55\,a^3\,c}{3}+\frac {55\,a^3\,d}{4}\right )\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^5+\left (-\frac {73\,a^3\,c}{3}-\frac {73\,a^3\,d}{4}\right )\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^3+\left (11\,a^3\,c+\frac {49\,a^3\,d}{4}\right )\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}{f\,\left ({\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^8-4\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^6+6\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^4-4\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2+1\right )}+\frac {5\,a^3\,\mathrm {atanh}\left (\frac {5\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\,\left (4\,c+3\,d\right )}{2\,\left (10\,c+\frac {15\,d}{2}\right )}\right )\,\left (4\,c+3\,d\right )}{4\,f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((a + a/cos(e + f*x))^3*(c + d/cos(e + f*x)))/cos(e + f*x),x)

[Out]

(tan(e/2 + (f*x)/2)*(11*a^3*c + (49*a^3*d)/4) - tan(e/2 + (f*x)/2)^7*(5*a^3*c + (15*a^3*d)/4) + tan(e/2 + (f*x
)/2)^5*((55*a^3*c)/3 + (55*a^3*d)/4) - tan(e/2 + (f*x)/2)^3*((73*a^3*c)/3 + (73*a^3*d)/4))/(f*(6*tan(e/2 + (f*
x)/2)^4 - 4*tan(e/2 + (f*x)/2)^2 - 4*tan(e/2 + (f*x)/2)^6 + tan(e/2 + (f*x)/2)^8 + 1)) + (5*a^3*atanh((5*tan(e
/2 + (f*x)/2)*(4*c + 3*d))/(2*(10*c + (15*d)/2)))*(4*c + 3*d))/(4*f)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ a^{3} \left (\int c \sec {\left (e + f x \right )}\, dx + \int 3 c \sec ^{2}{\left (e + f x \right )}\, dx + \int 3 c \sec ^{3}{\left (e + f x \right )}\, dx + \int c \sec ^{4}{\left (e + f x \right )}\, dx + \int d \sec ^{2}{\left (e + f x \right )}\, dx + \int 3 d \sec ^{3}{\left (e + f x \right )}\, dx + \int 3 d \sec ^{4}{\left (e + f x \right )}\, dx + \int d \sec ^{5}{\left (e + f x \right )}\, dx\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(f*x+e)*(a+a*sec(f*x+e))**3*(c+d*sec(f*x+e)),x)

[Out]

a**3*(Integral(c*sec(e + f*x), x) + Integral(3*c*sec(e + f*x)**2, x) + Integral(3*c*sec(e + f*x)**3, x) + Inte
gral(c*sec(e + f*x)**4, x) + Integral(d*sec(e + f*x)**2, x) + Integral(3*d*sec(e + f*x)**3, x) + Integral(3*d*
sec(e + f*x)**4, x) + Integral(d*sec(e + f*x)**5, x))

________________________________________________________________________________________